//
//  JSMDreamCitySpecialTravelTableViewCell.m
//  TakeYouTourTogether
//
//  Created by king on 15/12/2.
//  Copyright © 2015年 king. All rights reserved.
//

#import "JSMDreamCitySpecialTravelTableViewCell.h"

@implementation JSMDreamCitySpecialTravelTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createTableViewCell];
    }
    return self;
}

- (void)createTableViewCell {
    self.travelSightsLabel = [[BaseLabel alloc] init];
    self.travelSightsLabel.backgroundColor = [UIColor clearColor];
    [self.contentView addSubview:self.travelSightsLabel];
    
    self.travelSightsLabel.numberOfLines = 0;
    [self.travelSightsLabel sizeToFit];
}

- (void)layoutSubviews {
    [super layoutSubviews];
    
    NSDictionary *dic = [NSDictionary dictionaryWithObjectsAndKeys:[UIFont systemFontOfSize:16], NSFontAttributeName, nil];
    CGRect rect = [self.travelSightsLabel.text boundingRectWithSize:CGSizeMake(SCREENWIDTH, 0) options:NSStringDrawingUsesLineFragmentOrigin attributes:dic context:nil];
    self.travelSightsLabel.frame = CGRectMake(0, 0, SCREENWIDTH, rect.size.height);
}

@end
